2020-2021 Sunseeker Telemetry and Lighting System
adc10_a_ex2_intRef.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_A_PERIOD   80
 

Functions

void main (void)
 
void ADC10_A_ISR (void)
 
void TA0_ISR (void)
 

Macro Definition Documentation

◆ TIMER_A_PERIOD

#define TIMER_A_PERIOD   80

ADC10_A - Sample A0 input, 1.5V Shared Ref, LED ON if A0 > 0.5V

MSP430F550x Demo A single sample is made on A0 with reference to internal 1.5V Vref.Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, ADC10_A_ISR will force exit from LPM0 in Mainloop on reti. If A0 > 0.5V, P1.0 set, else reset.

          MSP430F550x
       -----------------
   /|\|              XIN|-
    | |                 |
    --|RST          XOUT|-
      |          P6.0/A0|<- Sample Signal
      |             P1.0|-> LED

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • ADC10_A peripheral
  • REF peripheral
  • TIMER_A peripheral
  • GPIO Port peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • ADC10_A_VECTOR
  • TIMER0_A0_VECTOR

Definition at line 69 of file adc10_a_ex2_intRef.c.

Function Documentation

◆ ADC10_A_ISR()

void ADC10_A_ISR ( void  )

◆ main()

void main ( void  )

Definition at line 71 of file adc10_a_ex2_intRef.c.

References __delay_cycles(), __no_operation(), and TIMER_A_PERIOD.

◆ TA0_ISR()

void TA0_ISR ( void  )

Definition at line 220 of file adc10_a_ex2_intRef.c.